inherit elisp-common eutils

EAPI="prefix"

DESCRIPTION="Minor mode for editing RubyOnRails code in Emacs"
HOMEPAGE="http://rubyforge.org/projects/emacs-rails/"
SRC_URI="
	http://rubyforge.org/frs/download.php/13556/${P}.tar.gz
	http://www.kazmier.com/computer/snippet.el
	http://www.webweavertech.com/ovidiu/emacs/find-recursive.txt
"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc-macos ~x86 ~x86-macos"
IUSE=""

RDEPEND="
	virtual/emacs
"
DEPEND="
	${RDEPEND}	
"

S=${WORKDIR}/${PN}

src_unpack() {
	unpack ${P}.tar.gz
	cp ${DISTDIR}/snippet.el ${S}
	cp ${DISTDIR}/find-recursive.txt ${S}/find-recursive.el
}

src_install () {
	insinto /usr/share/emacs/site-lisp/emacs-rails
	for el in ${S}/*.el
	do
		doins ${el}
	done

	elisp-site-file-install ${FILESDIR}/71emacs-rails-gentoo.el
}


pkg_postinst() {
	elisp-site-regen
}

pkg_postrm() {
	elisp-site-regen
}
